<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新增</title>
    <script src="../js/layui/layui.js"></script>
    <link rel="stylesheet" href="../js/layui/css/layui.css"/>
</head>
<body>
<form class="layui-form" id="gongZuoForm" method="post" lay-filter="companyFilter">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">公司名称</label>
            <div class="layui-input-inline">
                <input type="text" name="comname"   placeholder="公司名称" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">行业类别</label>
            <div class="layui-input-inline">
                <input type="text" name="hangyetype"   autocomplete="off" class="layui-input" >
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">职位名称</label>
            <div class="layui-input-inline">
                <input type="text" name="workname"  autocomplete="off" class="layui-input" >
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">职位类别</label>
            <div class="layui-input-inline">
                <input type="text" name="zhiyetype"  autocomplete="off" class="layui-input" >
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">工作时间</label>
            <div class="layui-input-inline">
                <input type="text" name="workdate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">职位月薪</label>
            <div class="layui-input-inline">
                <input type="text" name="salary"  autocomplete="off" class="layui-input" >
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">自我评价</label>
            <div class="layui-input-inline">
                <textarea placeholder="请输入内容" name="pingjia" class="layui-textarea"></textarea>
            </div>
        </div>
    </div>
</form>
</body>
<script>
    var $;
    layui.use(['form', 'layedit', 'laydate'], function() {
        var form = layui.form,
            layer = layui.layer,
            layedit = layui.layedit,
            laydate = layui.laydate;
        $=layui.jquery;
        //日期
        laydate.render({
            elem: '#date',
            type:'datetime'
        });
    })

    function saveGongZuo() {
        $.ajax({
            url:'../web/saveGongZuo',
            data:$("#gongZuoForm").serialize(),
            type:'post',
            dataType:'json',
            success:function (data) {
                if(!data){
                    layer.alert("新增失败",{icon:0})
                }
            }
        })
    }
</script>
</html>